package com.estar.assistsurvy.thread;

import com.estar.assistsurvy.constant.Constants;
import com.estar.assistsurvy.entity.RequestReBroadcast;
import com.estar.assistsurvy.entity.ResponseMsg;

import android.content.Context;
import android.os.Handler;
import android.util.Log;

public class ReBroadcastThread extends BaseThread {

	private RequestReBroadcast reBroadcast;

	public ReBroadcastThread(Context context, Handler handler, RequestReBroadcast reBroadcast) {
		super(context, handler);
		this.reBroadcast = reBroadcast;
	}
	
	@Override
	public void run() {
		// TODO Auto-generated method stub
		super.run();
		url_str=Constants.NAMESPACE+Constants.AGAINBROADCAST;
		json=gson.toJson(reBroadcast);
		postRequest(url_str, json);
		Log.i("wl", "重新播报返回值"+result);
		ResponseMsg message=new ResponseMsg();
		message=gson.fromJson(result, ResponseMsg.class);
		msg.what=2;
		msg.obj=message;
		msg.sendToTarget();
	}
}
